<template>
  <div>
    <el-row>
      <el-col :span="12">
        <el-card>
          <template #header>
            <div>
              <span>已办</span>
            </div>
          </template>
          <el-form ref="form" :model="form2" label-width="120px">
            <el-form-item label="申请ID"> <span>{{ form2.applyId }}</span> </el-form-item>
            <el-form-item label="申请状态"> <span>{{ form2.status }}</span> </el-form-item>
            <el-form-item label="请假天数"> <span>{{ form2.oldLeaveDays }}</span> </el-form-item>
          </el-form>
        </el-card>
      </el-col>
      <el-col :span="12">
        参数1：doneViewObject，当前选中已办的所有信息，供页面使用
        <pre style="max-height:200px;overflow-y: scroll;">{{ doneViewObject }}</pre>
        <hr />
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { post } from '@/utils/ajax'

export default {
  name: "DonePage",
  props: {
    doneViewObject: Object,
  },
  data() {
    return {
      loading: false,
      form2: {},
    }
  },
  created() {
    this.init();
  },
  methods: {
    init() {
      const applyId = this.doneViewObject.businessKey;
      post("/samples/leave/selectById", { id: applyId }).then(response => {
        this.form2 = response.data;
        this.form2.oldLeaveDays = response.data.leaveDays;
      });
    },
    
  }
}
</script>

<style lang="scss" scoped>
</style>